//
//  WH_WebViewController.m
//  App_6.23
//
//  Created by wanghao on 16/7/11.
//  Copyright © 2016年 lushan. All rights reserved.
//

#import "WH_WebViewController.h"

@interface WH_WebViewController ()<UIWebViewDelegate>

@end

@implementation WH_WebViewController


-(void)viewWillAppear:(BOOL)animated{
    
    
    [self.tabBarController.tabBar setHidden:YES];
}
-(void)viewWillDisappear:(BOOL)animated{
    
    
    [self.tabBarController.tabBar setHidden:NO];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIWebView *webView = [[UIWebView alloc] init];
    [self.view addSubview:webView];
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:_urlStr]]];
    [webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0);
        make.left.right.mas_equalTo(@0);
        make.bottom.mas_equalTo(@49);
    }];
    webView.delegate = self;
    webView.scrollView.bounces = NO;
    webView.scalesPageToFit = YES;
    [self createHub];
    [self hubShow];

}
//开始加载时调用的方法
- (void)webViewDidStartLoad:(UIWebView *)webView{
    
}

//结束加载时调用的方法
- (void)webViewDidFinishLoad:(UIWebView *)webView{
 
    [self hubDismiss];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
